home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / HANDYVGA.ZIP / MAIN.ASM < prev    next >
Encoding:
Assembly Source File  |  1994-05-06  |  4.1 KB  |  207 lines

  1.  
  2. ; Coded by Ash/Alpha...
  3. ; I made this thing just for fun, so don't expect a lot of it uh..
  4. ; hmm...well I think it's cewl cos it's real small...
  5. ; and remember...Greets go2 Diablo/SPR
  6.  
  7. code segment
  8. assume cs:code
  9. org 100h
  10. jumps
  11.  
  12. start:
  13.  
  14.         mov    ax,13h
  15.         int    10h
  16.         mov    ax,0a000h
  17.         mov    es,ax
  18.  
  19.         mov    bx,320
  20. mainloop:    call    vrt
  21.         mov    di,0
  22.         add    di,word ptr [line01]
  23.         call    palette1
  24.         inc    [line01]
  25.                 mov     di,28*320
  26.         add    di,word ptr [line02]
  27.         call    palette1
  28.         dec    [line02]
  29.                 mov     di,56*320
  30.                 add     di,word ptr [line03]
  31.         call    palette1
  32.                 inc     [line03]
  33.                 mov     di,84*320
  34.                 add     di,word ptr [line04]
  35.         call    palette1
  36.                 dec     [line04]
  37.                 mov     di,112*320
  38.                 add     di,word ptr [line05]
  39.         call    palette1
  40.                 inc     [line05]
  41.         mov    di,140*320
  42.         add    di,word ptr [line06]
  43.         call    palette1
  44.         dec    [line06]
  45.         mov    di,168*320
  46.         add    di,word ptr [line07]
  47.         call    palette1
  48.         inc    [line07]
  49.  
  50.         mov    ah,1
  51.         int    16h
  52.         jz    continue1
  53.         mov    ah,0
  54.         int    16h
  55.         jmp    end_shit
  56.  
  57. continue1:    dec    bx
  58.         jnz    mainloop
  59.  
  60.         xor    cx,cx
  61. loop0:        push    cx
  62.         call    vrt
  63.         pop    cx
  64.         mov    bx,200
  65.         mov    di,cx
  66. loop1:        mov    byte ptr es:[di],0
  67.         add    di,320
  68.         dec    bx
  69.         jnz    loop1
  70.  
  71.         mov    ah,1
  72.         int    16h
  73.         jz    continue2
  74.         mov    ah,0
  75.         int    16h
  76.         jmp    end_shit
  77.  
  78. continue2:    inc    cx
  79.         cmp    cx,320
  80.         jne    loop0
  81.  
  82. donow:
  83.  
  84.         xor    cx,cx
  85.         mov    ax,320
  86. loop2:        push    cx
  87.         call    vrt
  88.         pop    cx
  89.         mov    ax,320
  90.         mul    cx
  91.         mov    bx,320
  92.         mov    di,ax
  93. loop3:        mov    byte ptr es:[di],8
  94.         inc    di
  95.         dec    bx
  96.         jnz    loop3
  97.         mov    ah,1
  98.         int    16h
  99.         jz    continue3
  100.         mov    ah,0
  101.         int    16h
  102.         jmp    end_shit
  103. continue3:    inc    cx
  104.         cmp    cx,200
  105.         jne    loop2
  106.         xor    cx,cx
  107.         mov    ax,320
  108. loop4:          push    cx
  109.         call    vrt
  110.         pop    cx
  111.         mov    ax,320
  112.         mul    cx
  113.         mov    bx,320
  114.         mov    di,ax
  115. loop5:          mov     byte ptr es:[di],7
  116.         inc    di
  117.         dec    bx
  118.                 jnz     loop5
  119.         mov    ah,1
  120.         int    16h
  121.         jz    cont4
  122.         mov    ah,0
  123.         int    16h
  124.         jmp    end_shit
  125. cont4:        inc    cx
  126.         cmp    cx,200
  127.                 jne     loop4
  128.  
  129.         mov    ah,1
  130.         int    16h
  131.         jz    donow
  132.         mov    ah,0
  133.         int    16h
  134.  
  135. end_shit:    mov    ax,3
  136.         int    10h
  137.         mov    ax,0b800h
  138.         mov    es,ax
  139.         mov    cx,2000
  140.         mov    di,0
  141.         mov    si,offset endpic
  142.         rep    movsw
  143.         mov    ah,2
  144.         xor    bh,bh
  145.         mov    dh,100
  146.         int    10h
  147.         mov    ax,4c00h
  148.         int    21h
  149.  
  150. vrt:        mov    cx,1
  151.         mov    dx,3dah
  152. vrt1:        in    al,dx
  153.         test    al,8
  154.         jne    vrt1
  155. vrt2:        in    al,dx
  156.         test    al,8
  157.         je    vrt2
  158.         loop    vrt1
  159.         ret
  160.  
  161. ; Data
  162.  
  163. palette1:       mov     byte ptr es:[di+320*1],30
  164.                 mov     byte ptr es:[di+320*2],29
  165.                 mov     byte ptr es:[di+320*3],28
  166.                 mov     byte ptr es:[di+320*4],27
  167.                 mov     byte ptr es:[di+320*5],26
  168.                 mov     byte ptr es:[di+320*6],25
  169.                 mov     byte ptr es:[di+320*7],24
  170.                 mov     byte ptr es:[di+320*8],23
  171.                 mov     byte ptr es:[di+320*9],22
  172.                 mov     byte ptr es:[di+320*10],21
  173.                 mov     byte ptr es:[di+320*11],20
  174.                 mov     byte ptr es:[di+320*12],19
  175.                 mov     byte ptr es:[di+320*13],18
  176.                 mov     byte ptr es:[di+320*14],17
  177.                 mov     byte ptr es:[di+320*15],16
  178.                 mov     byte ptr es:[di+320*16],17
  179.                 mov     byte ptr es:[di+320*17],18
  180.                 mov     byte ptr es:[di+320*18],19
  181.                 mov     byte ptr es:[di+320*19],20
  182.                 mov     byte ptr es:[di+320*20],21
  183.                 mov     byte ptr es:[di+320*21],22
  184.                 mov     byte ptr es:[di+320*22],23
  185.                 mov     byte ptr es:[di+320*23],24
  186.                 mov     byte ptr es:[di+320*24],25
  187.                 mov     byte ptr es:[di+320*25],26
  188.                 mov     byte ptr es:[di+320*26],27
  189.                 mov     byte ptr es:[di+320*27],28
  190.                 mov     byte ptr es:[di+320*28],29
  191.                 mov     byte ptr es:[di+320*29],30
  192.         ret
  193.  
  194. line01 dw 0
  195. line02 dw 319
  196. line03 dw 0
  197. line04 dw 319
  198. line05 dw 0
  199. line06 dw 319
  200. line07 dw 0
  201.  
  202. endpic    label byte
  203.     include endpic.db
  204.  
  205. code ends
  206. end start
  207.